<template>
    <div>
        <h2>子</h2>
        <slot :msg="msg"></slot>

        <!-- <button @click="fun($parent)">展示</button> -->
        <hr>
        <!-- <GrandSon :="$attrs" /> -->
    </div>
</template>
<!-- 214142443211111111111111 -->
<script setup>
import GrandSon from "./grandson.vue"
const num = ref(1)
const msg = ref("插槽的数据")
defineExpose({ num })
const fun = (parent) => {
    console.log(parent, "父亲");
}

</script>